<script setup>

defineProps({
    menuData: {
        type: Array,
        required: true
    }
})

</script>

<template>
    <template v-for="item in menuData">
        <el-menu-item v-if="!item.children" :index="item.index" :disabled="item.disabled">{{ item.text }}</el-menu-item>
        <el-sub-menu v-if="item.children" :index="item.index">
            <template #title>{{ item.text }}</template>
            <recursive-nav :menu-data="item.children"></recursive-nav>
        </el-sub-menu>
    </template>
</template>

<style scoped>

</style>
